/**
 * 包装一个延时函数
 * 
 * @param {function} callback 
 * @param {int} millsecond 
 */
export function delay(callback, millsecond){
  let timer = null;
  return function delayWorker(){
    if (timer) clearTimeout(timer); 
    timer = setTimeout(callback, millsecond);
  }
}
